package com.scu.phototabuser.ui.taskgroup;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

import com.scu.phototabuser.Consts;
import com.scu.phototabuser.ui.home.HomeActivity;
import com.scu.phototabuser.util.PreferenceUtil;

/**
 * Created by tianfei on 2017/4/30.
 * 跳转到{@link ChooseGroupActivity} 或  {@link HomeActivity}
 */

public class UserChosenDecisionMaker extends AppCompatActivity{

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        //check if no chosen type， jump to ChooseGroupActivity
        boolean exist=
                PreferenceUtil.isExistUserChosenTypes();

        if (!exist){
            Intent intent=new Intent(this,ChooseGroupActivity.class);
            startActivity(intent);
            finish();
        }else{
            Intent intent=new Intent(this, HomeActivity.class);
            startActivity(intent);
            finish();
        }
    }
}
